home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MacHack 2000
/
MacHack 2000.toast
/
pc
/
The Hacks
/
Softshoe
/
Lisa's Mac Parts
/
Views
/
Panes
/
Pane.h
< prev
next >
Wrap
Text File
|
2000-06-23
|
1KB
|
58 lines
// Pane.h
#ifndef Pane_h
#define Pane_h
#ifndef ListLink_h
#include "ListLink.h"
#endif
#ifndef DrawsSpontaneously_h
#include "DrawsSpontaneously.h"
#endif
#ifndef View_h
#include "View.h"
#endif
class CellVisitor;
class Canvas;
class Pane
{
friend class CanvasLoopBase;
private:
const DrawsSpontaneously *parent;
View *content;
ListLink<Pane> viewLink; // Panes which share our view
void SetContent( View& view, DrawsSpontaneously * );
// not implemented:
Pane( const Pane& );
void operator=( const Pane& );
protected:
void SetParent( const DrawsSpontaneously *p ) { parent = p; }
public:
explicit Pane( const DrawsSpontaneously *parent = 0 );
~Pane();
void Clear();
virtual void SetContent( View& view )
{ SetContent( view, dynamic_cast<DrawsSpontaneously*>(&view) ); }
void Deliver( CellVisitor&,
const Canvas& parentCanvas,
Canvas& scratchCanvas ) const;
View& Content() const { return *content; }
const DrawsSpontaneously *Parent() const { return parent; }
virtual void Adjust( Canvas& ) const = 0;
};
#endif